

using System;
using System.Text;

using NHibernate;
using NHibernate.Cfg;
using NHibernate.Criterion;
using NHibernate.Exceptions;

using LastFMGenNHibernate.EN.LastFM;
using LastFMGenNHibernate.CAD.LastFM;

namespace LastFMGenNHibernate.CEN.LastFM
{
        public partial class ComentarioCEN
        {
        private IComentarioCAD _IComentarioCAD;

        public ComentarioCEN(IComentarioCAD _IComentarioCAD)
        {
                this._IComentarioCAD = _IComentarioCAD;
        }

        public int New_ (int p_id, String p_comment)
        {
                ComentarioEN comentarioEN = null;
                int oid;

                //Initialized ComentarioEN
                comentarioEN = new ComentarioEN ();
                comentarioEN.Id = p_id;
                comentarioEN.Comment = p_comment;
                //Call to ComentarioCAD

                oid = _IComentarioCAD.New_ (comentarioEN);
                return oid;
        }

        public void Destroy (int id)
        {
                _IComentarioCAD.Destroy (
                        id

                        );
        }

        public System.Collections.Generic.IList<ComentarioEN> DevolverComentarios (int first, int size)
        {
                System.Collections.Generic.IList<ComentarioEN> list = null;

                list = _IComentarioCAD.DevolverComentarios (first, size);
                return list;
        }
        public void Modify (int p_Comentario_OID, String p_comment)
        {
                ComentarioEN comentarioEN = null;

                //Initialized ComentarioEN
                comentarioEN = new ComentarioEN ();
                comentarioEN.Id = p_Comentario_OID;
                comentarioEN.Comment = p_comment;
                //Call to ComentarioCAD

                _IComentarioCAD.Modify (comentarioEN);
        }
        }
}
